package edu.thu.studio.ormdesigner.editor.dialog;

import org.eclipse.gef.EditPartViewer;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;

import edu.thu.studio.ormdesigner.common.AbstractTabbedDialog;
import edu.thu.studio.ormdesigner.model.ORMModel;

public abstract class NodeDialog extends AbstractTabbedDialog {

	private EditPartViewer viewer;

	public NodeDialog(Shell parentShell, EditPartViewer viewer) {
		super(parentShell);

		this.viewer = viewer;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected void initialize(Composite composite) {
		this.createTabFolder(composite);
	}

	public EditPartViewer getViewer() {
		return viewer;
	}
	
	public ORMModel getORMModel(){
		return (ORMModel)this.viewer.getContents().getModel();
	}

}
